As demonstrated above, it is customary to provide an init() method for initializing TC objects immediately after allocation. (C++ provides a feature to automate initialization, which is not available in TC.) The init() method may itself perform additional allocation as dictated by the programmer.
It is also customary to send a destroy() message to the object immediately before deallocating the object. The destroy() method should deallocate any space allocated by the init() method. (Again, C++ provides for "destructors" which are automatically called when the object is deallocated.)
The space pointed to by an object pointer is deallocated in TC using the delete() function, while C++ provides the 'delete' operator for this purpose. It simply deallocates the object pointed to by its argument.
jack->destroy(); /* C++ provides automated "destructors" */
delete(jack); /* in C++ parentheses are not needed */